package com.ruoyi.produce.report.procedureProgress.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.produce.report.procedureProgress.domain.ProcedureProgress;
import com.ruoyi.produce.report.procedureProgress.service.IProcedureProgressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/produce/form")
public class ProcedureProgressController extends BaseController {

    @Autowired
    private IProcedureProgressService procedureProgressService;

    /**
     * 获取工序进度报表
     * @param procedureProgress
     * @return
     */
    @PostMapping("/procedure/progress")
    public TableDataInfo procedureProgressList(@RequestBody ProcedureProgress procedureProgress) {
        startPage();
        List<ProcedureProgress> procedureProgresses = procedureProgressService.selectProcedureProgressForm(procedureProgress);
        return getDataTable(procedureProgresses);
    }
}
